package com.engine.cn.sigletom;

public class HungrySingleton1 {
    private static final HungrySingleton1 INSTANCE = new HungrySingleton1();

    private HungrySingleton1() {
        System.out.println("HungrySingleton1");
    }

    public static HungrySingleton1 getInstance() {
        return INSTANCE;
    }

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            new Thread(() -> {
                HungrySingleton1 instance = getInstance();
                System.out.println("instance==>" + instance);
            }).start();
        }
    }

}
